import {configure} from 'choerodon-ui';


const generatePageQuery = ({ page, pageSize, sortName, sortOrder }: any) => ({
  page: page === undefined ? page : page - 1,
  size: pageSize,
  sort: sortName && (sortOrder ? `${sortName},${sortOrder}` : sortName),
});

configure({
  ripple: false,
  modalOkFirst: false,
  // lookupBatchAxiosConfig,
  lookupAxiosMethod: 'GET',
  dataKey: 'content',
  totalKey: 'totalElements',
  generatePageQuery,
  status: {
    add: 'create',
    update: 'update',
    delete: 'delete',
  },
  // iconfontPrefix: 'c7n',
  statusKey: '_status',
  tlsKey: '_tls',
  // eslint-disable-next-line react/jsx-props-no-spreading
});